package com.hbisedm.interninfosys.intern.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author Sam
 * @since 2020-12-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "ID", type = IdType.AUTO)
    private Integer id;

    @TableField("USERNAME")
    private String username;

    @TableField("OTHERNAME")
    private String othername;

    @TableField("PASSWORD")
    private String password;

    @TableField("MOBILEPHONE")
    private String mobilephone;

    @TableField("DEPARTMENT")
    private String department;

    @TableField("MAJOR")
    private String major;

    @TableField("GRADE")
    private String grade;

    @TableField("EMAIL")
    private String email;

    /**
     * 1 => 男
     * 2 => 女
     */
    @TableField("SEX")
    private Integer sex;

    @TableField("AVATAR")
    private String avatar;

    /**
     * 管理员 0
     * 学生 1
     * 教师 2
     * 实习单位 3
     */
    @TableField("TYPE")
    private Integer type;

    @TableField(value = "DELETED", fill = FieldFill.INSERT)
    @TableLogic
    private Integer deleted;

    @TableField("SIGNATURE")
    private String signature;

    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "UPDATE_TIME", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


}
